import { api, authedApi } from '../utils/axios'

export function signIn(request) {
    return api.post('/token/', request);
}

export function getUserDetail() {
    return authedApi.get('/api/user/detail');
}

export function isAdminInterface() {
  return authedApi.get(`/user/info/`);
}
//是否为项目创建人或项目管理员
export function isMemberInterface(id) {
  return authedApi.get(`/projects/${id}/members/status/`);
}
//登录的时候验证用户是否已经被停用
export function userNameIsStop(params = {}){
  return api.post(`/user/active/`,  params);
}
//删除项目
export function deleteBadProject(id) {
  return authedApi.delete(`/projects/${id}/`);
}
//消息列表
export function getMessageList(params) {
  return authedApi.get(`/message/`,{params});
}
//将消息全部已读
export function readOver(params){
  return authedApi.post(`/message/read_all_message/`,{params});
}
//单条信息已读
export function messageReadOne(message_id){
  return authedApi.post(`/message/${message_id}/read_message/`);
}
